Recently, video (moving pictures) record/reproduction devices such as a DVD recorder, a PC (Personal Computer) having a recording and regenerating function, a camcorder, etc. that encode, multiplex, record, and regenerate video and audio.
In recording video and audio on the video record/reproduction devices, when a video signal corresponding to video and an audio signal corresponding to audio are input, each signal is encoded, and output as a video stream and an audio stream. A video stream is encoded in, for example, an MPEG (Moving Picture Experts Group) 2 system. The encoded video stream and audio stream is time-division multiplexed, output as a multiplexed stream, and recorded on a record medium.
When the video record/reproduction device is in accordance with the standard of BD (Blu-ray Disc) defined by the BDA (Blu-ray Disc Association), the multiplexed stream is configured by 192 bytes as one packet, and 1 aligned unit is configured by 32 packets (=6144 bytes). Some of these video record/reproduction devices can manage transmitting the header of the GOP as a header of an aligned unit on the GOP boundary in a multiplexed stream to be transmitted. In these devices, when a packet including a GOP being transmitted is terminated without reaching the number of packets (integral multiple of 32) in aligned units, the deficiency is complemented by null packets, and then a packet including the next GOP is transmitted.
FIG. 5 illustrates a schematic diagram of a packet transmitted as described above.
As shown in FIG. 5, the packets (GOP#M0, . . . , GOP#Mi) including a GOP#M being transmitted terminate without reaching 1 aligned unit, the deficiency is complemented by null packets ((Null0, . . . , Nullm) to guarantee the 6144-byte alignment, and then the packets (GOP#N0, . . . , GOP#Ni) including the next GOP#N are transmitted. In FIG. 5, since the packet including the GOP#N has also terminated without reaching 1 aligned unit, the deficiency is also complemented by null packets (Null0, . . . , Nulln).
Actual transmission time (multiplexing time) is inserted as an ATS (Arrival Time Stamp) into each of the transmitted packets. For example, actual transmission time Tm as an ATS is inserted into a packet (GOP#M0) including the header of the GOP#M as the header of an aligned unit, and actual transmission time Tn as an ATS is inserted into a packet (GOP#N0) including the header of the GOP#N as the header of next aligned unit.
FIG. 6 illustrates an example of the configuration of transmitting a packet as described above.
In FIG. 6, a null packet generation unit 51 generates and outputs a null packet (unnecessary/insignificant packet) depending on DMA kick by a control unit 59. A video packet generation unit 52 encodes an input video signal in, for example, an MPEG2 format, and generates and outputs a video packet configuring a video stream. An audio packet generation unit 53 encodes an input audio signal in a predetermined format, and generates and outputs an audio packet configuring an audio stream. A system packet generation unit 54 generates and outputs a system packet including time information required in decoding and regenerating a signal. A multiplexing unit 55 time-division multiplexes a null packet, a video packet, an audio packet, and a system packet to generate and output a multiplexed packet (of 188 bytes) configuring a multiplexed stream. A GOP detection unit 56 monitors a packet output from the multiplexing unit 55, and detects a packet including a GOP. A packet counter 57 counts the number of packets output from the multiplexing unit 55. An ATS (Arrival Time Stamp) addition unit 58 adds actual transmission time (multiplexing time) expressed by 4 bytes as an ATS (Arrival Time Stamp) to the header of the packet output from the multiplexing unit 55, and outputs a 192-byte packet configuring a multiplexed stream (transmitting a packet). A control unit 59 is configured by hardware or firmware, and controls the operation of each unit relating to encoding, multiplexing, etc.
With the configuration above, the control unit 59 first controls the video packet generation unit 52, the audio packet generation unit 53, the system packet generation unit 54, and the multiplexing unit 55, and starts outputting packets including the first GOP (for example, a “GOP#M”) from the multiplexing unit 55. Then, if it is determined from the detection result of the GOP detection unit 56 monitoring a packet output from the multiplexing unit 55 that a packet including the GOP#M is not detected any more (1. Interrupt Detect), then the counter value of the packet counter 57 (Packet Counter Value) at the time is confirmed (2. Check Value), and it is determined whether or not packets including the GOP#M have terminated without reaching the number of packets in aligned units (packets of a multiple of 32). In the determination, if the value of a packet counter value mod 32 is other than 0,it is determined that the packets including the GOP#M have terminated without reaching the number of packets in aligned units.
The packet counter 57 is configured so that, for example, the counter value is reset to 0 immediately before the packet including the header of the GOP is output from the multiplexing unit 55, and the counter value can be 1 for the packet including the header of the GOP.
If it is determined that the packets including the GOP#M have terminated without reaching the number of packets in aligned units, then the null packet generation unit 51 is controlled (3. DMA Kick (32-(Packet Counter Value Mod 32)) and the multiplexing unit 55 is also controlled to output null packets as the deficiency to fill the number of packets in aligned units. Then, the video packet generation unit 52, the audio packet generation unit 53, the system packet generation unit 54, and the multiplexing unit 55 are controlled again to start outputting packets including the next GOP from the multiplexing unit 55.
In the above-mentioned determination, if the packets including the GOP#M have terminated in the number of packets in aligned units, then the above-mentioned null packets are not output, and the video packet generation unit 52, the audio packet generation unit 53, the system packet generation unit 54, and the multiplexing unit 55 are simply controlled to start outputting the packets including the next GOP from the multiplexing unit 55.
In the subsequent steps, the process is performed similarly.
By repeating the operations, the header of the GOP is transmitted at the header of the aligned unit, and if the packets including the GOP have terminated without reaching the number of packets in aligned units, the deficiency is complemented by null packets. Thus, the GOP management can be performed in aligned units.
FIG. 7 is a schematic diagram illustrating an example of storing a packet transmitted as described above in storage.
As illustrated in FIG. 7, if a null packet is transmitted when the transmitted packet is stored in storage (for example, a DVD, an SD card, etc.) for each aligned unit, then the null packet is also stored.
An example of the conventional video record/reproduction device is described above with reference to FIGS. 5 through 7, and the technology relating to each technique applied to the device is disclosed in, for example, the patent documents 1,2, 3, etc.
In the conventional video record/reproduction device described above with reference to FIGS. 5 through 7, if the transmitted packet including the GOP has terminated without reaching the number of packets in aligned units, then a null packet is transmitted to perform the inter-GOP management in aligned units. Therefore, the transmission band can be degraded by the transmission of the null packet, or there can be the case that a storage capacity cannot be effectively utilized by the storage of a null portion (null packet) when a multiplexed stream is stored.
The present invention aims at providing an inter-GOP management apparatus and its method capable of effectively using a transmission band only by a necessary packet and storing only a valid portion when a multiplexed stream is stored.                Patent Document 1: Japanese Laid-open Patent Publication No. 2001-167528        Patent Document 2: Japanese Laid-open Patent Publication No. 2002-159004        Patent Document 3: Japanese Laid-open Patent Publication No. 11-340938        